package com.itheima.health.service;

import com.itheima.health.exception.DuplicateOperateException;
import com.itheima.health.exception.OrderCountOverLimitExceptoin;
import com.itheima.health.exception.OrderTimeNotAllowedException;
import com.itheima.health.pojo.Member;
import com.itheima.health.pojo.Order;

import java.util.List;
import java.util.Map;

public interface OrderService {
    /**
     *添加
     * @param order
     * @return
     *
     * 约满
     * 重复预约
     * 预约时间不在范围内
     */
    Order add(Order order)throws OrderCountOverLimitExceptoin, DuplicateOperateException, OrderTimeNotAllowedException;

    /**
     * 根据id查询
     * @param id
     * @return
     */

    Order findById(Integer id);

    /**
     *  套餐预约情况
     * @return [{"name":"套餐1","value":10},..]
     */
    List<Map<String, Object>> countBySetmeal();
}

